<template>
  <el-row :gutter="20" id="designProductConsStyle">
    <el-form :model="detailObj" label-width="130px" :disabled="true">
<el-col :span="24">
<el-col :span="12">
<el-form-item label="组织机构主编码:" size="medium">
  <el-input size="medium" v-model="detailObj.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行政组织名称:" size="medium">
 <el-input size="medium" v-model="detailObj.org_name"></el-input>
</el-form-item>
</el-col>
</el-col>

<el-col :span="24">
<el-col :span="12">
<el-form-item label="组织简称:" size="medium">
 <el-input size="medium" v-model="detailObj.org_jc"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上级组织机构名称:" size="medium">
<el-input size="medium" v-model="detailObj.p_org_name"></el-input>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="是否法人:" size="medium">
<el-input size="medium" v-model="detailObj.is_fr"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="纳税人识别号:" size="medium">
<el-input size="medium" v-model="detailObj.nsr_no"></el-input>
</el-form-item>
</el-col>
</el-col>

<el-col :span="24">
<el-col :span="12">
<el-form-item label="电话:" size="medium">
<el-input size="medium" v-model="detailObj.phone"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用状态:" size="medium">
<el-input size="medium" v-model="detailObj.openStatusName"></el-input>
</el-form-item>
</el-col>
</el-col>

<el-col :span="24">
<el-col :span="12">
<el-form-item label="组织负责人:" size="medium">
<el-input size="medium" v-model="detailObj.org_fzr"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组织分管领导:" size="medium">
<el-input size="medium" v-model="detailObj.org_leader"></el-input>
</el-form-item>
</el-col>
</el-col>
    </el-form>
  </el-row>
</template>

<script>
import {DesignManageApi} from '@/services/WorkCenter'
export default {
  props:{
todos:Number
  },
data(){
  return{
detailObj:{

}
  }
},
methods:{
getOrgDetailData(){//详情数据
  DesignManageApi.getOrgDetailData({
    params:{
      id:this.todos//组织主键id
    }
  }).then((res)=>{
this.detailObj=res.data;
if(this.detailObj.open_status==1){
  this.$set(this.detailObj,'openStatusName','未启用')
}else if(this.detailObj.open_status==2){
  this.$set(this.detailObj,'openStatusName','已启用')
}else if(this.detailObj.open_status==3){
  this.$set(this.detailObj,'openStatusName','已停用')
}
  }).catch((error)=>{
    console.log(error)
  })
}
},
watch:{
todos(n,o){
  if(n!=0){
    this.getOrgDetailData();
  }else{
    this.detailObj={}
  }
}
},
created(){
if(this.todos!=0){
  this.getOrgDetailData();//详情数据
}
}
}
</script>

<style lang="scss" scoped>

</style>